import { WebView } from '@tarojs/components'
import { useLoad } from '@tarojs/taro'
import './index.scss'
import { getApiConfig } from '../../../config/api'

const appconfig = getApiConfig()
console.log(appconfig)
export default function Index () {
  useLoad(async () => {
 
  })

  const handleMessage = (e) => {
    // 阻止WebView默认弹窗行为
    e.preventDefault()
    console.log('WebView message:', e)
  }

  return (
    <WebView
      src={'https://webview.0551page.cn/ldy_index/show?appid=' + appconfig.appid}
      onMessage={handleMessage}
      allow-popups
    />
  )
}
